package com.sright.bcard.content.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.common.service.share.dto.page.PageParamRequest;
import com.sright.bcard.content.dal.dao.WxappDAO;
import com.sright.bcard.content.dal.entity.WxappDO;
import com.sright.bcard.content.dal.mapper.WxappDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class WxappDAOImpl extends BaseDAOImpl<WxappDO> implements WxappDAO {

    @Resource
    private WxappDOMapper wxappDOMapper;

    @Override
    public Integer count(PageParamRequest pageParamRequest) {
        return wxappDOMapper.count(pageParamRequest);
    }

    @Override
    public List<WxappDO> pageList(PageParamRequest pageParamRequest) {
        return wxappDOMapper.pageList(pageParamRequest);
    }

    @Override
    public Integer status(Long id, Integer status, Long enterpriseId) {
        return wxappDOMapper.status(id, status, enterpriseId);
    }

    @Override
    public Integer deleteStatus(Long id) {
        return wxappDOMapper.deleteStatus(id);
    }

    @Override
    public WxappDO selectByEnterpriseId(Long enterpriseId) {
        return wxappDOMapper.selectByEnterpriseId(enterpriseId);
    }

    @Override
    protected BaseMapper<WxappDO> getObjMapper() {
        return wxappDOMapper;
    }
}
